<?php
	require_once("web_fns.php");
	$brand_name = trim($_POST['brand_name']);
	$user_id = $_POST['user_id'];
	$check_result = create_sell_order($orders_table,$brand_name,$user_id);
	switch($check_result) {
		//订单生成成功
		case 1:
			echo "1";
			break;
		//该手机号已有未处理的订单
		case 2:
			echo "2";
			break;
		//同一个session反复提交
		case 3:
			echo "3";
			break;
		//查询发生错误或提交失败
		default:
			echo "0";
	}
?>